import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

import Home from '@views/home'
import bannerDetail from '@views/bannerDetail'
import Quota from '@views/quote'
import Select from '@views/select'
import Trade from '@views/trade'
import Order from '@views/order'
import OrderDetail from '@views/orderDetail'
import HistoryOrder from '@views/orderHistory'
import Mine from '@views/mine'
import Login from '@views/user/login.vue'
import Register from '@views/user/regist.vue'
import Findback from '@views/user/findBack.vue'
import UserInfo from '@views/user/Info.vue'
import Feedback from '@views/user/feedBack.vue'
import Newtask from '@views/activity/newTask.vue'

import Agent from '@views/activity/agent.vue'
import RecommendRegist from '@views/activity/recommendRegist'
import Recommend from '@views/activity/recommend.vue'

import Service from '@views/service'
import News from '@views/News/news.vue'
import NewsDetail from '@views/news/newsDetail.vue'
import Classroom from '@views/news/classroom.vue'
import Info from '@views/news/info.vue'
import Noob from '@views/news/noob.vue'

import BindBank from '@views/account/bindBank.vue'
import Withdraw from '@views/account/withdraw.vue'
import Banlance from '@views/account/banlance.vue'
import Pay from '@views/account/pay.vue';
// import Live from '@views/live'

export default new Router({
	// mode: 'history',
	routes: [
		{
			path: '/',
			name: '首页',
			component: Home,
			meta: {
				loginAuth: false,
			}
		},

		{
			path: '/bannerDetail',
			name: 'bannerDetail',
			component: bannerDetail,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/quota',
			name: 'Quota',
			component: Quota,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/select',
			name: 'Select',
			component: Select,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/trade',
			name: 'Trade',
			component: Trade,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/order',
			name: 'Order',
			component: Order,
			meta: {
				loginAuth: true,
			}
		},
		{
			path: '/detailorder',
			name: 'detailorder',
			component: OrderDetail,
			meta: {
				loginAuth: true,
			}
		},
		{
			path: '/historyOrder',
			name: 'HistoryOrder',
			component: HistoryOrder,
			meta: {
				loginAuth: true,
			}
		},
		{
			path: '/mine',
			name: 'Mine',
			component: Mine,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/login',
			name: 'Login',
			component: Login,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/register',
			name: 'Register',
			component: Register,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/findback',
			name: 'Findback',
			component: Findback,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/user/info',
			name: 'UserInfo',
			component: UserInfo,
			meta: {
				loginAuth: true,
			}
		},
		{
			path: '/user/feedback',
			name: 'Feedback',
			component: Feedback,
			meta: {
				loginAuth: false,
			},
		},
		{
			path: '/activity',
			name: 'activity',
			component: Newtask,
			meta: {
				loginAuth: true,
			},
			
		},
		{
			path: '/activity/newtask',
			name: 'newtask',
			component: Newtask,
			meta: {
				loginAuth: true,
			}
		},
		{
			path: '/activity/tuiguang',
			name: 'Agent',
			component: Agent,
			meta: {
				loginAuth: true,
			}
		},
		{
			path: '/activity/tuiguangreg',
			name: 'RecommendRegist',
			component: RecommendRegist,
			meta: {
				loginAuth: false,
			}
        },
        {
            path: '/activity/recommend',
            name: '邀请好友',
            component: Recommend,
            meta: {
				loginAuth: false,
			}
        },
		{
			path: '/service',
			name: 'Service',
			component: Service,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/news',
			name: 'News',
			component: News,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/news/detail',
			name: 'NewsDetail',
			component: NewsDetail,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/news/classroom',
			name: 'Classroom',
			component: Classroom,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/news/info',
			name: 'Info',
			component: Info,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/news/noob',
			name: 'Noob',
			component: Noob,
			meta: {
				loginAuth: false,
			}
		},
		{
			path: '/account/bindbank',
			name: 'BindBank',
			component: BindBank,
			meta: {
				loginAuth: true,
			}
		},
		{
			path: '/account/withdraw',
			name: 'Withdraw',
			component: Withdraw,
		},
		{
			path: '/account/balance',
			name: 'Banlance',
			component: Banlance,
			meta: {
				loginAuth: true,
			}
		},
		{
			path: '/account/pay',
			name: 'Pay',
			component: Pay,
			meta: {
				loginAuth: true,
			}
		},
		// {
		// 	path: '/live',
		// 	name: 'Live',
		// 	component: Live,
		// 	meta: {
		// 		loginAuth: false,
		// 	}
		// },
	]
})
